initialize
Initializes the control with its associated module context.
This method is typically called once before the control is first used or made active. It allows the control to set up its internal state, resources, and prepare for operation based on the provided data.
If #isAutoStart() is true, implementations might also trigger their start logic within or immediately after initialization.
Initializes the clock view based on the properties defined in the provided com.reveldigital.player.api.Module. This method parses options for clock type, color, format, font, and shadow effects, then creates and adds the appropriate internal clock view (Digital, Analog, or RealTime). It iterates through the Options in the provided module
to configure:
- ForeColor: Sets the color of the clock display. Parsed from a hex string (e.g., "RRGGBB"). Defaults to WHITE if not specified or invalid.
- ClockType: Determines the type of clock to display. Can be "Analog", "Digital", or "Realtime". Defaults to DIGITAL if not specified or unrecognized.
- DateTimeFormat: Specifies the format string for digital and real-time clocks (e.g., "HH:mm:ss", "MM/dd/yy"). The interpretation of this format depends on the specific clock implementation. Defaults to "t".
- FontFamily: Sets the font family for digital and real-time clocks. Defaults to "Arial".
- DropShadowEffect: Configures any shadow effect for the clock. The interpretation of this value depends on the specific clock implementation. Defaults to an empty string (no shadow).
ClockView
is constructed and before start is called.Parameters
The com.reveldigital.player.api.Module object containing configuration for this clock. Note: This parameter currently overrides the module passed in the constructor if different. This behavior might be intentional for re-initialization, or it could be an area for review if this.module
should be immutable after construction.